<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>error报错监控</title>
</head>
<body>
<script type="module">
    import error from "./index.js";
    error()
    // 资源加载异常
    const img = document.createElement('img');
    img.src = './bg.png';
    img.alt = '';
    document.body.appendChild(img);
    // promise异常
    function test(a) {
        return new Promise((resolve, reject) => {
            if(a > 1) {
                resolve()
            } else {
                reject('dsdsdsdsd')
            }
        })
    }
    test(1)
    // console异常
    console.error('ddddd')
    // js异常
    console.log(b)
</script>
</body>
</html>
